<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<!-- Required Stylesheets -->
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/css/reset.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/css/text.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/css/fonts/ptsans/stylesheet.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/css/fluid.css" media="screen" />

<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/css/mws.style.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/css/icons/icons.css" media="screen" />

<!-- Demo and Plugin Stylesheets -->
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/css/demo.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/css/timepicker.css"  />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/plugins/colorpicker/colorpicker.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/plugins/jimgareaselect/css/imgareaselect-default.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/plugins/fullcalendar/fullcalendar.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/plugins/fullcalendar/fullcalendar.print.css" media="print" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/plugins/tipsy/tipsy.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/plugins/sourcerer/Sourcerer-1.2.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/plugins/jgrowl/jquery.jgrowl.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/plugins/spinner/spinner.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/css/jui/jquery.ui.css" media="screen" />

<!-- Theme Stylesheet -->
<link rel="stylesheet" type="text/css" href="{$templateDir}/temp1/css/mws.theme.css" media="screen" />

<!-- JavaScript Plugins -->

<script type="text/javascript" src="{$templateDir}/temp1/js/jquery-1.7.1.min.js"></script>

<script type="text/javascript" src="{$templateDir}/temp1/plugins/jimgareaselect/jquery.imgareaselect.min.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/jquery.dualListBox-1.3.min.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/jgrowl/jquery.jgrowl.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/jquery.filestyle.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/fullcalendar/fullcalendar.min.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/jquery.dataTables.js"></script>
<!--[if lt IE 9]>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/flot/excanvas.min.js"></script>
<![endif]-->
<script type="text/javascript" src="{$templateDir}/temp1/plugins/flot/jquery.flot.min.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/flot/jquery.flot.pie.min.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/flot/jquery.flot.stack.min.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/flot/jquery.flot.resize.min.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/colorpicker/colorpicker.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/tipsy/jquery.tipsy.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/sourcerer/Sourcerer-1.2.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/jquery.placeholder.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/jquery.validate.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/jquery.mousewheel.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/plugins/spinner/ui.spinner.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/js/jquery-ui.js"></script>

<script type="text/javascript" src="{$templateDir}/temp1/js/mws.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/js/demo.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/js/themer.js"></script>
<script type="text/javascript" src="{$templateDir}/temp1/js/check.js"></script>
<script type="text/javascript">
$(document).ready(function () {
	$('#timepicker').timepicker({
	});
	$('#timepicker2').timepicker({
	});
	$("input[name=chooseClient]:radio").change( function() {
		var value = $("input[name=chooseClient]:checked").val();
		if(value == 0)
		{
			$("#newClient").hide();
			$("#exsitClient").show();
		}
		else
		{
			$("#exsitClient").hide();
			$("#newClient").show();
		}
	});
	getNotificationDelivery();
	getNotificationCollection();
	

	
});

function listClient()
{
	var url = "{$websiteURL}/controller/ajaxGetAllMember.php"; 
	        
	dialog = $("#diag");
    
    if ($("#diag").length == 0) {
        dialog = $('<div id="diag" style="display:none" class="loading"></div>').appendTo('body');
    } 	        
    // open the dialog
    dialog.dialog({
        // add a close listener to prevent adding multiple divs to the document
        close: function(event, ui) {
            // remove div with all data and events
            dialog.remove();
        },
        modal: true,
        width : 640,
        position: "top"
    });
    // load remote content
    dialog.load(
        url, 
        {}, // omit this param object to issue a GET request instead a POST request, otherwise you may provide post parameters within the object
        function (responseText, textStatus, XMLHttpRequest) {
            // remove the loading class
            dialog.removeClass('loading');	                 
        }
    );
    //prevent the browser to follow the link
    return false;
}
function getNotificationDelivery()
{
	var url = "{$websiteURL}/controller/ajaxGetNotificationDelivery.php";  
	$.ajax({
		type: "GET",
  		url: url 
	}).done(function( msg ) {
		$('#contentDelivery').html(msg);
		});
	//var refresh = [600000];
	var refresh = [30000];
	interval = setTimeout('getNotificationDelivery()', refresh);
}
function getNotificationCollection()
{
	var url = "{$websiteURL}/controller/ajaxGetNotificationCollection.php";  
	$.ajax({
		type: "GET",
  		url: url 
	}).done(function( msg ) {
		$('#contentCollection').html(msg);
		});
	//var refresh = [600000];
	var refresh = [30000];
	interval = setTimeout('getNotificationCollection()', refresh);
}

function Clickheretoprint()
{ 
  var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
      disp_setting+="scrollbars=no,left=100, top=25"; 
  var content_vlue = document.getElementById("print_content").innerHTML; 
  
  var docprint=window.open("","",disp_setting); 
   docprint.document.open(); 
   docprint.document.write('<html><head><title>Inel Power System</title>'); 
   docprint.document.write('</head><body onLoad="self.print()"><center>');          
   docprint.document.write(content_vlue);          
   docprint.document.write('</center></body></html>'); 
   docprint.document.close(); 
   docprint.focus(); 
}

function printDiv(divName) {
    var printContents = document.getElementById(divName).innerHTML;
    var originalContents = document.body.innerHTML;

    document.body.innerHTML = printContents;

    window.print();

    document.body.innerHTML = originalContents;
}
</script>
</script>
<script type="text/javascript" src="{$templateDir}/temp1/js/timepicker.js"></script>


<title>MWS Admin - Dashboard</title>
